package org.octopus.lee.main;

import org.octopus.lee.controller.DubboController;
import org.octopus.lee.service.RegistryService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by UCMED on 2016/12/30.
 */
public class MainTest {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("dubbo-customer.xml");
        context.start();

        /*DubboController dubbocontroller = (DubboController)context.getBean("dubboController");
        RegistryService registryService = (RegistryService)context.getBean("registryService");
        dubbocontroller.setRegistryService(registryService);
        System.out.println(dubbocontroller.show("甲壳虫2"));
        System.out.println("调用完了");*/

        DubboController dubbocontroller = (DubboController)context.getBean("dubboController");
        System.out.println(dubbocontroller.show("甲壳虫2"));
    }
}
